package config

import (
	"os"

	"gopkg.in/yaml.v3"
)

var C struct {
	Database struct {
		DSN string `yaml:"dsn"`
	}
}

func Load(path string) error {
	file, err := os.ReadFile(path)
	if err != nil {
		return err
	}
	return yaml.Unmarshal(file, &C)
}
